package problems;

import lib.MathLib;

public class Euler020 extends AbstractEuler {

	@Override
	public Number calculate() {
		String fac100 = MathLib.factorial(100L).toString();
		int answer = 0;
		for (int i = 0; i < fac100.length(); i++) {
			answer += Integer.valueOf(fac100.substring(i, i+1));
		}
		return answer;
	}

	@Override
	protected Number getCorrectAnswer() {
		return 648;
	}

}
